﻿@using Bids.Core.Common.Pager;
@model PagedList<Bids.Core.DomainObjects.Task>
@{
    ViewBag.Title = "任务列表";
}
<div class="wz"><img src="/images/wz.png" alt="img" width="518" height="75" /></div>
    <div class="list">
    	<table width="946" border="0" cellpadding="0" align="center" cellspacing="0" bordercolor="#d3ac70" style="border-collapse:collapse;font-size:12px;">
  <tr style="color:#fff;font-weight:bold;">
    <td width="509" height="38" background="/images/tit_bg.jpg">&nbsp;任务信息</td>
    <td width="91" height="38" background="/images/tit_bg.jpg"><div align="center">设计金额</div></td>
    <td width="90" height="38" background="/images/tit_bg.jpg"><div align="center">交稿数量</div></td>
    <td width="156" height="38" background="/images/tit_bg.jpg"><div align="center">任务状态</div></td>
    <td width="100" height="38" background="/images/tit_bg.jpg" ><div align="center">结束时间</div></td>
  </tr>
  <tr>
    <td height="0" colspan="5"></td>
    </tr>
@foreach (var item in Model)
{
      <tr>
        <td height="39" class="jjj">&nbsp; 
            <b><a href="/task/detail/@(item.ID).html">@item.Name</a>
                @if (item.KeepSecret)
                { 
                <img src="/images/list_icon1.jpg" alt="img" width="12" height="14" />
                }
                                           </b> <p>@item.Extraneous</p></td>
        <td height="39" class="jjj"><div align="center">@(item.Cost-item.Imprest)元</div></td>
        <td height="39" class="jjj"><div align="center">@item.Contributions.Count</div></td>
        <td height="39" class="jjj"><div align="center">
            @switch(item.TaskState)
            {
                case Bids.Core.DomainObjects.TaskStatus.投稿中:
                    <img src="/images/tg.jpg" alt="img" width="144" height="19" />
                    break;
                    case Bids.Core.DomainObjects.TaskStatus.选稿中:
                    case Bids.Core.DomainObjects.TaskStatus.稿件确认:
                    <img src="/images/xg.jpg" alt="img" width="144" height="19" />
                    break;
                    case Bids.Core.DomainObjects.TaskStatus.已结束:
                    <img src="/images/wc.jpg" alt="img" width="144" height="19" />
                    break;
                    
            }
                                    </div></td>
        <td height="39" class="jjj"><div align="center">@item.GetRemainingTime()</div></td>
      </tr>
}

    
</table>
	<div class="page">
        @Html.Pager(Model, new PagerOptions { 
                PageIndexParameterName = "page",CurrentPagerItemWrapperFormatString="<a href='javascript:;'>{0}</a>",
              ShowMorePagerItems=false,
               ShowFirstLast = false,
               NumericPagerItemCount = 3
                
               },"Route",null)
	</div>
    </div>
